<!DOCTYPE html>
<meta charset="utf-8" />
<style type="text/css">
.table-header {
    background-color: #46A3FF;
    color: #fff;
    font-size: 14px;
    line-height: 38px;
    margin-bottom: 1px;
    padding-left: 12px;
}
#resultDiv div table tr td{
	padding:10px;
	width:150px;
}
</style>
<div id="resultDiv" style="text-align:center; margin-right:50px; width:100%;">
<div>
	<table style="width:100%">
		<thead>
			<tr>
				<td colspan="4">商户信息</td>
			</tr>
			<Tr>
				<td>机构号</td>
				<td>商户号</td>
				<td>商户密钥</td>
			</Tr>
		</thead>
		<tbody id="mybody2">
			
		</tbody>
	</table>
</div>

</div>
	<div class="form-actions align-right  form-button-box" style="margin-top: 10px">
			<button class="btn btn-info" type="submit">
				保存
			</button>
			&nbsp; 
			<button class="btn" type="button" onclick="javascript:dialog.close(this);">
				 关闭
			</button>
		</div>
<script type="text/javascript">
	var pageSize=7;
	var bodycp1=0;
	$(document).ready(function() {
		var dialog=$("#dlg-custAccountView").Dialog();
		var agentId = dialog.pageParam.agentId;
		$.ajax({
			type : "post",
			url : "mpamng/agent/queryAgentKey.do",
			data:{"agentId":agentId},
			dataType : 'json',
			success : function(result) {
				var tr ='<tr>'+'<td>'+result.obj.agentId+'</td>';
				if(result.obj.agentCustId){
					tr+='<td>'+result.obj.agentCustId+'</td>';
				}else{
					tr+='<td></td>';
				}
				if(result.obj.agentKey){
					tr+='<td>'+result.obj.agentKey+'</td>';
				}else{
					tr+='<td></td>';
				}
				tr+='</tr>';
				$("#mybody2").append(tr);
			},
			error : function(XMLHttpRequest, textStatus) {
				msg.alert("错误", "错误代码：" + XMLHttpRequest.status + ",错误描述："+ textStatus, 'error');
			}
		});
	});
	
</script>